package com.bistu.sim.xwy.news.Other;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import com.bistu.sim.xwy.news.R;

public class ArticlePageActivity extends AppCompatActivity {

    private TextView title;
    private TextView content;
    private TextView category;

    private String the_title;
    private String the_content;
    private String the_category;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_article_page);
        initview();
        Intent intent = getIntent();
        if(intent != null){
            the_title = intent.getStringExtra("title");
            the_content = intent.getStringExtra("content");
            the_category = intent.getStringExtra("category");
        }
        title.setText(the_title);
        category.setText(the_category);
        content.setText(the_content);
    }

    private void initview() {

        title =(TextView) findViewById(R.id.the_title);
        content =(TextView) findViewById(R.id.the_content);
        category =(TextView) findViewById(R.id.the_category);
    }
}